﻿@model LostAndFound.Web.Models.CloseCaseVM

@{
    ViewBag.Title = "Lost and Found - Edit Case";
}

<h2>Edit Case</h2>
@if (TempData["message"] != null)
{
    <div class="alert alert-success" role="alert">
        <strong>@TempData["message"]</strong>
    </div>
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal" id="editcaseform">
         <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    
        <div class="form-group">
            @Html.LabelFor(model => model.ItemName, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.ItemName, new { htmlAttributes = new { @class = "form-control" } })              
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })             
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.LostItemType, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.LostItemType, new { htmlAttributes = new { @class = "form-control" } })             
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })              
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Phone, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.Phone, new { htmlAttributes = new { @class = "form-control" } })
            </div>
        </div>
        
        <div class="form-group">
            @Html.LabelFor(model => model.LostLocation, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.LostLocation, new { htmlAttributes = new { @class = "form-control" } })         
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.LostDateTime, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.LostDateTime, new { htmlAttributes = new { @class = "form-control" } })
            
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Approved, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="checkbox">
                    @Html.DisplayFor(model => model.Approved)
                 
                </div>
            </div>
        </div>
               
        <div class="form-group">
            @Html.LabelFor(model => model.IPAdress, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.IPAdress, new { htmlAttributes = new { @class = "form-control" } })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Active, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <div class="col-md-10">
                    @Html.DisplayFor(model => model.Active, new { htmlAttributes = new { @class = "form-control" } })
                </div>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DateCreated, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DisplayFor(model => model.DateCreated, new { htmlAttributes = new { @class = "form-control" } })             
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.FoundDate, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.FoundDate, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.FoundDate, "", new { @class = "text-danger" })
            </div>
        </div>


        <div class="form-group">
            @Html.LabelFor(model => model.Notes, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Notes, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Notes, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ReasonCaseClosed, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ReasonCaseClosed, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ReasonCaseClosed, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ClaimerFirstName, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ClaimerFirstName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ClaimerFirstName, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ClaimerLastName, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ClaimerLastName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ClaimerLastName, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ClaimerEmail, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ClaimerEmail, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ClaimerEmail, "", new { @class = "text-danger" })
            </div>
        </div>

      <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @Html.CheckBoxFor(model => model.KeepCaseOpen)
                @Html.LabelFor(model => model.KeepCaseOpen)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Update the Case" class="btn btn-default" />
            </div>
        </div>
    </div>
}
<script>
    $(function () {
        $(".FoundDate").datepicker();
    });
</script>